#ifndef _SYS_TIME_H_
#define _SYS_TIME_H_

#include "FanObj.h"
#include "SysTypes.h"

#define TIME_VTABLE(self)   ((TimeVTable*)((FanObj*)self)->vtable)


extern Type*    Time_classType;
extern VTable*  Time_classVTable;


/* [sys::Time] Attributes */
struct Time
{
  FanObj        super;
};


/* [sys::Time] Virtual-table */
typedef struct TimeVTable
{
  FanObjVTable  super;
} TimeVTable;


/* [sys::Time] Methods and fields */
Bool            Time_equals(Obj self, NullableObj that);
Int             Time_compare(Obj self, Obj obj);
Int             Time_hash(Obj self);
Str*            Time_toStr(Obj self);
Time*           Time_defVal(void);
Time*           Time_now_0(void);
Time*           Time_now(TimeZone* tz);
Time*           Time_make_2(Int hour, Int min);
Time*           Time_make_3(Int hour, Int min, Int sec);
Time*           Time_make(Int hour, Int min, Int sec, Int ns);
Time*           Time_fromStr_1(Str* s);
Time*           Time_fromStr(Str* s, Bool checked);
Int             Time_hour(Time* self);
Int             Time_min(Time* self);
Int             Time_sec(Time* self);
Int             Time_nanoSec(Time* self);
Str*            Time_toLocale_0(Time* self);
Str*            Time_toLocale(Time* self, Str* pattern);
Time*           Time_fromLocale_2(Str* str, Str* pattern);
Time*           Time_fromLocale(Str* str, Str* pattern, Bool checked);
Time*           Time_fromIso_1(Str* s);
Time*           Time_fromIso(Str* s, Bool checked);
Str*            Time_toIso(Time* self);
Time*           Time_fromDuration(Duration* d);
Duration*       Time_toDuration(Time* self);
DateTime*       Time_toDateTime_1(Time* self, Date* d);
DateTime*       Time_toDateTime(Time* self, Date* d, TimeZone* tz);
Str*            Time_toCode(Time* self);
Bool            Time_isMidnight(Time* self);


/* [sys::Time] Type-system functions */
Type*           Time_initType(void);
VTable*         Time_initVTable(void);
void            Time_initStatic(void);


#endif
